{% extends 'bbs/base.html' %}
{% load staticfiles %}
{% block title %}个人资料--Klein{% endblock %}
{% block head_css %}
{#    <link href="{% static 'Validform/demo/css/style.css' %}" rel="stylesheet">#}
{#    <link href="{% static 'Validform/demo/plugin/datePicker/datePicker.css' %}" rel="stylesheet">#}
    <link href="{% static 'uploadify/uploadify.css' %}" rel="stylesheet">
    <link href="{% static 'kindeditor/themes/default/default.css' %}">
    {#    {{ form.media }}#}
{% endblock %}
{% block body %}

    <div class="container-fluid well">
        <form action="{% url 'userinfo' %}" method="post" id="form_userinfo" class="form-horizontal"
              enctype="multipart/form-data">
            <div class="row">

                {% csrf_token %}
                <div class="col-md-2 col-md-offset-1">
                    <div class="form-group">
                        <label>用户名：</label><br>
                        {{ ud.r_user.username }}
                    </div>
                    <div class="form-group">
                        <label>用户昵称：</label>
                        {{ form.nickname }}
                    </div>
                    <div class="form-group">
                        <label>所在城市：</label>
                        {{ form.city }}
                    </div>
                    <div class="form-group">
                        <label>性别：</label>
                        {{ form.sex }}
                    </div>
                    <div class="form-group">
                        <label>生日：</label>
                        {{ form.birthday }}
                    </div>
                    <div class="form-group">
                        <label>星座：</label>
                        {{ form.constellation }}
                    </div>
                    <div class="form-group">
                        <label>职业：</label>
                        {{ form.job }}
                    </div>
                    <div class="form-group">
                        <label>角色</label><br>
                        {{ ud.role }}
                    </div>
                    <div class="form-group">
                        <label>积分</label><br>
                        {{ ud.grade }}
                    </div>

                </div>
                <div class="col-md-6 col-md-offset-2">
                    <div class="form-group">
                        <div class="col-md-4 col-md-offset-1">
                            <label>头像</label>
                            {% if ud.portrait %}
                                <img src="/media/{{ ud.portrait }}" class="img-responsive">
                            {% else %}
                                <img src="{% static 'img/bbs/none.jpg' %}" class="img-responsive">
                            {% endif %}
                            {#                        {{ form.portrait }}#}
                            <br>

                            <div class="form-group">
                                <div class="col-md-8 col-md-offset-2">
                                    <input type="file" id="id_fileupload">
                                </div>
                            </div>
                        </div>


                    </div>
                    <div class="form-group">
                        <label>个性签名：</label>
                        {{ form.signature }}
                    </div>
                    <div class="form-group">
                        <label>邀请码：</label><br>
                        {{ ud.i_code }}
                    </div>
                </div>


            </div>
            <div class="row">
                <div class="form-group">
                    <div class="col-md-4 col-md-offset-4 text-center">
                        <input type="submit" value="提交">
                        <input type="reset" value="重置">
                    </div>
                </div>
            </div>
        </form>
    </div>
{% endblock %}
{% block foot_js %}
    <script src="{% static 'js/MyCookies.js' %}"></script>
    <script src="{% static 'Validform/demo/js/Validform_v5.3.2.js' %}"></script>
    {#    <script src="{% static 'Validform/demo/plugin/datePicker/jquery.datePicker.js' %}"></script>#}
    <script src="{% static 'uploadify/jquery.uploadify.min.js' %}"></script>
    <script src="{% static 'kindeditor/kindeditor-all-min.js' %}"></script>
    <script src="{% static 'kindeditor/lang/zh_CN.js' %}"></script>
    <script src="{% static 'js/bbs/userinfo.js' %}"></script>
{% endblock %}